home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-08 | 162.2 KB | 2,602 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Mon, 07 Nov 94 Volume 3 : Issue 66
-
- Today's Topics:
-
- #defines by the compiler (CodeWarrior)
- Announcement: New Mac C++ Programming Book Available
- Apple Guide: Styled text FUBAR
- Basic GWorlds and QuickDraw Newbie
- CW & Code Resources -- poor?
- Desktop Pictures
- Drag-and-drop to cdev window?
- Fastest way to fill memory with a given value?
- Gestalt Selectors List 2.6
- Global storage in code resources
- How to execute MPW tools without MPW
- MacTCP Completion Routines & Async Nofification
- Memory Management within the Real World
- NewGWorld returns null pointer
- Pathnames? I don't think so...
- Q: Creating Variable sized structures?
- QuickTime + MIDI?
- Software volume locking: HELP!
- Some string routines for the PowerPC
- Tech Notes on the World Wide Web, and History Is Made
-
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
- (pottier@clipper.ens.fr).
-
- The digest is a collection of article threads from the internet newsgroup
- comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi-
- regularly and want an archive of the discussions. If you don't know what a
- newsgroup is, you probably don't have access to it. Ask your systems
- administrator(s) for details. If you don't have access to news, you may
- still be able to post messages to the group by using a mail server like
- anon.penet.fi (mail help@anon.penet.fi for more information).
-
- Each issue of the digest contains one or more sets of articles (called
- threads), with each set corresponding to a 'discussion' of a particular
- subject. The articles are not edited; all articles included in this digest
- are in their original posted form (as received by our news server at
- nef.ens.fr). Article threads are not added to the digest until the last
- article added to the thread is at least two weeks old (this is to ensure that
- the thread is dead before adding it to the digest). Article threads that
- consist of only one message are generally not included in the digest.
-
- The digest is officially distributed by two means, by email and ftp.
-
- If you want to receive the digest by mail, send email to listserv@ens.fr
- with no subject and one of the following commands as body:
- help Sends you a summary of commands
- subscribe csmp-digest Your Name Adds you to the mailing list
- signoff csmp-digest Removes you from the list
- Once you have subscribed, you will automatically receive each new
- issue as it is created.
-
- The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
- Questions related to the ftp site should be directed to
- scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
- digest are available there.
-
- Also, the digests are available to WAIS users. To search back issues
- with WAIS, use comp.sys.mac.programmer.src. With Mosaic, use
- http://www.wais.com/wais-dbs/comp.sys.mac.programmer.html.
-
-
- -------------------------------------------------------
-
- >From zobkiw@datawatch.com (joe zobkiw)
- Subject: #defines by the compiler (CodeWarrior)
- Date: Mon, 17 Oct 1994 13:45:40 GMT
- Organization: Datawatch Corporation
-
- I have been writing some Aladdin InstallerMaker extensions recently and
- have a nice little system that (using two projects and a "switch" in my
- main source file) allows me to compile the extension as an application for
- easy testing. Then, when I'm done, I can switch projects, switch the
- #define switch in my main source file, and compile it as the proper
- resource type.
-
- My question is, since CodeWarrior doesn't have a nice little "Prefix" type
- per-project option like THINK C had, is there another way? It would be
- great if the compiler knew what TYPE it was compiling the code as and I
- could get at this information in my code. Something like:
-
- #ifdef APPL // APPL is the TYPE of the project
- InitializeMacintoshManagers();
- #endif
-
- #ifdef IBeg // IBeg is the RESOURCE TYPE of the project
- SysBeep(0);
- #endif
-
- Is there another way to accomplish this? Any thoughts?
-
- _______________________________________________________ ,,,
- Joe Zobkiw zobkiw@datawatch.com - -
- Senior Software Engineer Datawatch Corporation L
- ___________ Zeros and Ones will take us there __________ _
-
- +++++++++++++++++++++++++++
-
- >From mwron@aol.com (MW Ron)
- Date: 17 Oct 1994 12:22:03 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- In article <zobkiw-1710940845400001@zobkiw.datawatch.com>,
- zobkiw@datawatch.com (joe zobkiw) writes:
-
- >>My question is, since CodeWarrior doesn't have a nice little "Prefix"
- type per-project option like THINK C had, is there another way? It would
- be great if the compiler knew what TYPE it was compiling the code as and I
- could get at this information in my code.
-
-
- The "Prefix File" option in the Languages Preferences lets you specify
- a file that gets automatically prepended to every file. Be default, it is
- set to the precompiled header for the Toolbox routines. However, you can
- specify your own file.
-
- For example, you could specify a Prefix File of MyPrefix.h, where the
- contents of MyPrefix.h was:
-
- #include <MacHeaders68K> // Included precompiled header
- // Define Symbols
-
- #ifdef APPL // APPL is the TYPE of the project
- InitializeMacintoshManagers();
- #endif
-
- #ifdef IBeg // IBeg is the RESOURCE TYPE of the project
- SysBeep(0);
- #endif
-
- Your Prefix File can contain any valid C statements.
-
- Ron Liechty
- RonL@metrowerks.com
- Metrowerks Inc.
-
-
-
- ---------------------------
-
- >From danparks@aol.com (DanParks)
- Subject: Announcement: New Mac C++ Programming Book Available
- Date: 15 Oct 1994 16:56:04 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- //******************************************************
- Apologies if this isn't the proper newsgroup for this message.
- I posted it to comp.sys.mac.announce, but it was returned as
- "not acceptable topic for this newsgroup" !!
- //******************************************************
-
- To All:
-
- There's a new Mac programming book now available - "Symantec C++:
- Object-Oriented Programming Fundamentals for the Macintosh" by Prima
- Publishing. It should be at your bookstore by the time you read this.
-
- "Symantec C++: Object-Oriented Programming Fundamentals for the
- Macintosh"
- Dan Parks Sydow
- Prima Publishing
- ISBN: 1-55958-633-8
-
- The book assumes the reader has a knowledge of a higher-level language -
- preferably the C language. It also assumes the reader has done at least a
- little programming on the Mac. No advanced-level programming skills are
- needed, and no previous knowledge of C++ is required.
-
- Like my previous Prima book, "Think THINK C", this book comes bundled with
- a disk that contains ALL of the source code examples presented in the
- book. It also has a tutorial software program that covers the major topics
- from the book, from a little different perspective. That program is called
- Simulator C++. The purpose of the software is to "bring to life" the
- concepts in the book through the use of text, graphics, QuickTime movies,
- and on-screen questions and answers.
-
- All examples in the book work with Symantec C++ version 6 or version 7.
- All examples run on either a 680x0 Mac or a Power Mac. There are a couple
- of dozen example programs - most of them short and covering just a single
- key topic. But there are also a couple of larger programs that incorporate
- many C++/object-oriented programming concepts. Earlier examples stress
- basic techniques, later examples stress programming C++ using Macintosh
- techniques - writing programs that make use of menus, dialogs, windows,
- resources, and graphics.
-
- As always, please feel free to send email to me ( addresses shown below)
- with any comments/suggestions/kind words/complaints/questions.
-
- *Note to CodeWarrior Owners*
- If you want to learn C++ programming for the Mac, this book MAY be for
- you. You'd have to be willing to skip one chapter of the book, and make
- minimal changes to the source code. You CodeWarrior owners shouldn't have
- too much trouble adapting the examples to your Metrowerks compiler. You'll
- need to create a new project, then add the included source code file to
- it. Most source code files need only one or two changes to compile with
- CodeWarrior. I'll be posting an errata sheet in this newsgroup next week
- for CodeWarrior users. It will detail the changes that need to be made.
-
- Internet: danparks@aol.com
- CompuServe: 73747,1401
- America Online: DanParks
-
-
- Regards,
-
- Dan
-
-
-
- +++++++++++++++++++++++++++
-
- >From zobkiw@datawatch.com (joe zobkiw)
- Date: Mon, 17 Oct 1994 13:38:50 GMT
- Organization: Datawatch Corporation
-
- In article <37pfl4$t91@newsbf01.news.aol.com>, danparks@aol.com (DanParks)
- wrote:
-
- > //******************************************************
- > Apologies if this isn't the proper newsgroup for this message.
- > I posted it to comp.sys.mac.announce, but it was returned as
- > "not acceptable topic for this newsgroup" !!
- > //******************************************************
- >
-
- How could the Macintosh programmers newsgroup not be the right place for
- an announcement about a new book about Macintosh programming? :)
-
- This damn info-super-highway has everyone afraid of getting flamed for the
- littlest thing, much like most kids in the inner-city are afraid to go to
- school because they'll get shot. So what do they do? Skip school and not
- post.
-
- Dan, it sounds like a good book. Thanks for the info.
-
- _______________________________________________________ ,,,
- Joe Zobkiw zobkiw@datawatch.com - -
- Senior Software Engineer Datawatch Corporation L
- ___________ Zeros and Ones will take us there __________ _
-
- ---------------------------
-
- >From cwiltgen@mcs.com (Charles Wiltgen)
- Subject: Apple Guide: Styled text FUBAR
- Date: Sat, 22 Oct 1994 18:09:26 -0500
- Organization: Muso Communications
-
- It's a major pain to use styled text in Apple Guide. Basically, I can't
- make any hypertext links stand out because Apple didn't think of including
- an "embolden" tag in the dang compiler.
-
- What is everyone using to create Apple Guide files with? SimpleText is
- out of the question. I'd like to use WriteNow, but the GuideMaker crashes
- when it tries to read it.
-
- Anyone have a solution?
-
- --
- Charles Wiltgen "Love is a snowmobile racing across the tundra and
- cwiltgen@mcs.com then suddenly it flips over, pinning you underneath.
- (INTP) At night, the ice weasels come." - Nietzsche (Groening)
- The Apocalypso! http://www.mcs.net/~cwiltgen
-
- +++++++++++++++++++++++++++
-
- >From quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
- Date: Sun, 23 Oct 1994 11:01:58 +0800
- Organization: Department of Computer Science, The University of Western
- Australia
-
- In article <cwiltgen-2210941809260001@cwiltgen.pr.mcs.net>,
- cwiltgen@mcs.com (Charles Wiltgen) wrote:
-
- >It's a major pain to use styled text in Apple Guide. Basically, I can't
- >make any hypertext links stand out because Apple didn't think of including
- >an "embolden" tag in the dang compiler.
-
- Yep, I've found this very annoying too. I basically gave up on hot text,
- at least for the moment.
-
- >What is everyone using to create Apple Guide files with?
-
- I use TexEdit. It's a pretty cool shareware styled text editor. [And
- yes, I have sent off my shareware payment.] Unfortunately there's no XTND
- filter for it, so the styles don't move across to AG.
-
- >I'd like to use WriteNow, but the GuideMaker crashes
- >when it tries to read it.
-
- I had *exactly* the same problem. I think (god forbid) that MS Word might
- be a good choice. As long as you restrict yourself to the core features
- it's fairly nice and the XTND filters are likely to be more stable.
- However my hard disk is Microsloth-free, which eliminates this option for
- me.
-
- Share and Enjoy.
- --
- Quinn "The Eskimo!" "I wasn't the one who fired the heat seeking
- population annihilator out the window!"
-
- +++++++++++++++++++++++++++
-
- >From cwiltgen@mcs.com (Charles Wiltgen)
- Date: Sun, 23 Oct 1994 12:43:14 -0500
- Organization: Muso Communications
-
- In article <quinn-2310941101580001@mac163.cs.uwa.oz.au>,
- quinn@cs.uwa.edu.au (Quinn "The Eskimo!") wrote:
-
- > >It's a major pain to use styled text in Apple Guide. Basically, I can't
- > >make any hypertext links stand out because Apple didn't think of including
- > >an "embolden" tag in the dang compiler.
- >
- > Yep, I've found this very annoying too. I basically gave up on hot text,
- > at least for the moment.
-
- That's potentially one of the Best ThingsTM about Apple Guide, and we can't
- use it because there's no way to find out what what's hot-clickable. I'm
- going to use Word on one of my smaller files (but I'm afraid!) or go to
- some sort of <<click here>> notation for now.
-
- > >I'd like to use WriteNow, but the GuideMaker crashes
- > >when it tries to read it.
- >
- > I had *exactly* the same problem. I think (god forbid) that MS Word might
- > be a good choice. As long as you restrict yourself to the core features
- > it's fairly nice and the XTND filters are likely to be more stable.
- > However my hard disk is Microsloth-free, which eliminates this option for
- > me.
-
- Thanks for the confirmation. I got WriteNow for $12.95 when I ordered
- something from MacWarehouse (don't tell anyone about this special offer!)
- and thought it would be perfect for this. Alas, it was not to be.
-
- C'mon, Apple! Add those <B>style</B> tags!!!
-
- --
- Charles Wiltgen "Love is a snowmobile racing across the tundra and
- cwiltgen@mcs.com then suddenly it flips over, pinning you underneath.
- (INTP) At night, the ice weasels come." - Nietzsche (Groening)
- The Apocalypso! http://www.mcs.net/~cwiltgen
-
- +++++++++++++++++++++++++++
-
- >From cwiltgen@mcs.com (Charles Wiltgen)
- Date: Sun, 23 Oct 1994 13:41:56 -0500
- Organization: Muso Communications
-
- In article <cwiltgen-2310941243140001@cwiltgen.pr.mcs.net>,
- cwiltgen@mcs.com (Charles Wiltgen) wrote:
-
- > > I think (god forbid) that MS Word might
- > > be a good choice. As long as you restrict yourself to the core features
- > > it's fairly nice and the XTND filters are likely to be more stable.
- > > However my hard disk is Microsloth-free, which eliminates this option for
- > > me.
-
- Nope, Word doesn't work either (although Guide reads Word files fine).
-
- Can someone from Apple help? I've already started doing my hot words like
- 'this$BB...
-
- --
- Charles Wiltgen "Love is a snowmobile racing across the tundra and
- cwiltgen@mcs.com then suddenly it flips over, pinning you underneath.
- (INTP) At night, the ice weasels come." - Nietzsche (Groening)
- The Apocalypso! http://www.mcs.net/~cwiltgen
-
- ---------------------------
-
- >From jpo6@po.CWRU.Edu (Jared P. O'neal)
- Subject: Basic GWorlds and QuickDraw Newbie
- Date: 18 Oct 1994 21:28:47 GMT
- Organization: Case Western Reserve University, Cleveland, Ohio (USA)
-
-
- I've created a GWorld, at least I think I have. Then, I used the
- GetGWorldPixMap() call to get the handle of the PixMap. All I wanted to do
- was
- use CopyBits to take a picture I had put into the GWorld w/ DrawPicture onto
- a
- window I had created, but when I tried it, it didn't copy anything into the
- window. When I tried to debug it (just how do you debug a GWorld), I noticed
- that the baseaddr was 0, which doesn't seem right. Is there anything I did
- wrong here? (I left out the error handling stuff)
-
- GetGWorld(&origPort, &origDev);
- myErr = NewGWorld(&myGWorldPtr, 0, &myRect, nil, nil, 0);
- SetGWorld(myGWorldPtr, nil);
- myPixMapHnd = GetGWorldPixMap(myGWorldPtr);
- good = LockPixels(myPixMapHnd);
- wndoRect = myGWorldPtr->portRect;
- EraseRect(&wndoRect);
-
- if (PictID != 0)
- {
- myPic = GetPicture(PictID);
- DrawPicture(myPic, &myRect);
- }
-
- SetGWorld(origPort, origDev);
-
- SetPort(wp);
-
- CopyBits((BitMap *)*myPixMapHnd, (BitMap *)wp, &wndoRect, &(wp->portRect), 0,
- nil);
-
- where wp is the WindowPtr of the destination window.
-
- --Jared
- --
- Philosophy: Master the colonel's secret blend of herbs & spices and all the
- secrets of the universe will be yours!?!
-
- Jared O'Neal aka jpo6@po.cwru.edu or oneale@ucsub.colorado.edu or
- JaredO@aol.co
-
- +++++++++++++++++++++++++++
-
- >From first.ascent@mindlink.bc.ca (Alex Curylo)
- Date: 19 Oct 1994 07:43:58 GMT
- Organization: First Ascent
-
- In article <381emf$d5d@usenet.INS.CWRU.Edu>
- jpo6@po.CWRU.Edu (Jared P. O'neal) writes:
-
- > Is there anything I did wrong here?
- >CopyBits((BitMap *)*myPixMapHnd, (BitMap *)wp, &wndoRect, &(wp->portRect),
- 0, nil);
-
- Yes. (BitMap *)*myPixMapHnd is wrong. Changing that to
- &((GrafPtr)myGWorldPtr)->portBits should make it work just fine. And
- (BitMap*)wp is wrong too. You want &((GrafPtr)wp)->portBits.
-
- +++++++++++++++++++++++++++
-
- >From gbolsinga@aol.com (GBolsinga)
- Date: 19 Oct 1994 15:24:02 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- In article <382inu$idq@deep.rsoft.bc.ca>, first.ascent@mindlink.bc.ca
- (Alex Curylo) writes:
-
- >Yes. (BitMap *)*myPixMapHnd is wrong. Changing that to
- >&((GrafPtr)myGWorldPtr)->portBits should make it work just fine. And
-
- This is wrong! To quote NIM: Imaging With QuickDraw:
- "To ensure compatibility on systems running basic QuickDraw instead of
- Color Quickdraw, use GetGWorldPixMap whenever you need to gain
- access to the bitmap created for a graphics world--that is, do NOT
- dereference the GWorldPtr record for that graphics world."
-
- The funny thing is, all the code samples for CopyBIts in the book that I
- saw do the WRONG thing. So many manuals, so little time... :)
-
- The problem is with the second (destination) Bitmap: change it to:
-
- &((GrafPtr)wp)->portBits
-
- and thing should be fine.
-
- Greg Bolsinga
- MPI Multimedia
-
- +++++++++++++++++++++++++++
-
- >From first.ascent@mindlink.bc.ca (Alex Curylo)
- Date: 24 Oct 1994 09:15:00 GMT
- Organization: First Ascent
-
- In article <rac-2110941951310001@intrigue.intrigue.com>
- rac@intrigue.com (Robert Coie) writes:
-
- > A word of caution about GetGWorldPixMap -- it was severely broken in
- > pre-7.0 systems. I think it grabbed a half word instead of a full 32-bit
- > word. If you are certain to be running on a post-7.0 system,
- > GetGWorldPixMap should be OK. If you are certain that Color QuickDraw is
- > present and are concerned about System 6 compatibility, do the direct
- > dereference.
-
- Yes indeed. Version 1.2, to be exact. Like this:
-
- // GetGWorldPixMap doesn't work in 32CQD 1.2
- gLameCQD = (qdVersion >= gestalt32BitQD) && (qdVersion <
- gestalt32BitQD13);
-
- // workaround for GetGWorldPixMap bug in CQD 1.2
- PixMapHandle OurGetGWorldPixMap(GWorldPtr world)
- {
- if (gLameCQD)
- return ((CGrafPtr)world)->portPixMap;
- else
- return GetGWorldPixMap(world);
- }
-
- But in the particular case of CopyBits,
- &((GrafPtr)myGWorldPtr)->portBits really does always work. Up to 7.5,
- anyway.
-
- ---------------------------
-
- >From afrancke@netcom.com (Andrew Francke)
- Subject: CW & Code Resources -- poor?
- Date: Wed, 12 Oct 1994 03:00:02 GMT
- Organization: Netcom Online Communications Services (408-241-9760 login:
- guest)
-
- After perusing CodeWarrior C for a little Component Manager
- development, I've formed the following reactions. Please respond with
- the approriate answers.
-
- Is it just me, or:
-
- * is there no way to create a single-segment code resource that uses
- the MW ANSI libs?
-
- * does the faux-segment loader just plain not work when the code
- resource's resource fork isn't open? when there are multiple
- multi-segment resources in the same file?
-
- * is there no way to have the following declaration in an MW
- code resource:
-
- char *foo = "bar"
-
- If the answer to the first question is "yes," when will MW ship an
- intelligent linker? Yes, yes -- it's way better than the
- THINK/Symantec linker in its identification of dead code. That doesn't
- matter if it's convinced you need multiple segments based on the
- *un*stripped code/data size.
-
- If the answer to any part of the second question is "yes," when will
- MW either: document the secret inner-workings of the multi-segment
- glue? Heck, if the answer is *no,* when will MW document it?
-
- The third question is based on the fuzzy observation (i.e., I didn't
- ATFCO -- adjust the compiler options) that a struct with a char *
- member could not be initialized with a static string.
-
- Finally -- on an entirely unrelated note -- when will somebody prepare
- a runtime library for MPW C-generated .o files that need such fine
- symbols as _iob and LDIVU -- that can then be used in MW projects.
-
- +++++++++++++++++++++++++++
-
- >From isochrome@aol.com (IsoChrome)
- Date: 13 Oct 1994 14:10:01 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- In article <afranckeCxJHo3.JD3@netcom.com>, afrancke@netcom.com (Andrew
- Francke) writes:
-
- > * does the faux-segment loader just plain not work when the code
- > resource's resource fork isn't open? when there are multiple
- > multi-segment resources in the same file?
-
- I've had the same problem with CW (we're writing 'cmm ' components). The
- component manager seems to cache the component code, so your resource fork
- isn't open when you are called. It looks like CW keeps some sort of jump
- table information in a separate resource ('cmmx' for 'cmm 's). The kiss of
- death is that the resource is loaded before a single line of your code is
- executed (to get the address of main maybe?), so there is no way you can
- open the resource fork yourself. I've had to punt and compile the 68K
- piece in Symantec and the PPC piece in CodeWarrior.
-
- John Sarapata
-
- +++++++++++++++++++++++++++
-
- >From hanrek@cts.com (Mark Hanrek)
- Date: Sun, 16 Oct 1994 07:53:44 GMT
- Organization: The Information Worskhop
-
- In article <afranckeCxJHo3.JD3@netcom.com>, afrancke@netcom.com (Andrew
- Francke) wrote:
-
- Try posting your question in "comp.sys.mac.programmer.codewarrior" which
- you may not have known existed. It's new, and you may find an answer to
- your question already posted, as I remember reading something along these
- lines recently.
-
- Mark Hanrek
-
- +++++++++++++++++++++++++++
-
- >From richardb@cocytus.demon.co.uk (Richard Buckle)
- Date: Tue, 18 Oct 1994 07:51:57 GMT
- Organization: none
-
- In article <afranckeCxJHo3.JD3@netcom.com>,
- afrancke@netcom.com (Andrew Francke) wrote:
-
- >* is there no way to create a single-segment code resource that uses
- > the MW ANSI libs?
-
- Not if you want to use any vaguely useful ANSI function, such as pow() or
- tolower(). The problem is the dead-code stripping can't see through
- libraries.
- I've repeatedly suggested that MW sort this out and in the interim either
- distribute cut-down ANSI libraries (string.lib, math.lib etc) without
- 32-bit links hard-wired in or at the very least distribute a 68020 build. I
- have got *nowhere*.
-
- >* does the faux-segment loader just plain not work when the code
- > resource's resource fork isn't open? when there are multiple
- > multi-segment resources in the same file?
-
- Basically yes. It can also crash horribly if your multi-segment resource is
- unlocked between calls to it and moves, as the 32-bit jumps do not get
- remade. UnloadA4Seg() does not help. I have asked MW to provide a way to
- tell the multi-segment resource to remake its jumps, such as calling
- UnloadA4Seg(NULL), but this too has fallen on deaf ears.
- Dammit, I feel strongly I should be entitled to unlock my code resources
- between calls to them.
- As I have no control over the third party app calling my code resource, I
- have been reduced to building a stub single-seg resource that calls the
- multi-seg resource, runs it and disposes of it to suit MW's brain-damaged
- segmentation scheme. Mail me if you want details.
-
- The whole segmentation thing on CodeWarrior *sucks*, on apps as well as
- code resources. See a thread by Steve Dorner a while ago for a description
- of the pure evil that is the application segment loader under CW.
-
- A dreadful shame, as this apart from this huge blind spot MW have a *very*
- fine product. Maybe some more net.pressure will do the trick.
-
-
- - -----------------------------------------------------
- Richard Buckle
- richardb@cocytus.demon.co.uk
- Using this darned fine NewsHopper thingy.
-
-
- +++++++++++++++++++++++++++
-
- >From Jens Alfke <jens_alfke@powertalk.apple.com>
- Date: Tue, 18 Oct 1994 17:26:12 GMT
- Organization: Apple Computer
-
- Andrew Francke, afrancke@netcom.com writes:
- > * does the faux-segment loader just plain not work when the code
- > resource's resource fork isn't open? when there are multiple
- > multi-segment resources in the same file?
-
- I believe it will work as long as you preload and detach the code segments.
- The loader obviously can't magically know how to open the resource file to
- get the code.
-
- > * is there no way to have the following declaration in an MW
- > code resource:
- > char *foo = "bar"
-
- Should work fine as long as A4 is set up properly at the time that the global
- data is referenced.
-
- I've directed follow-ups to c.s.m.p.codewarrior.
-
- --Jens Alfke jens_alfke@powertalk.apple.com
- "A man, a plan, a yam, a can of Spam ... Bananama!"
-
- +++++++++++++++++++++++++++
-
- >From ejr@netcom.com (Erik J. Rogers)
- Date: Thu, 20 Oct 1994 01:59:30 GMT
- Orga thePict ) ;
- oldFillCRgn = ( pascal void ( * ) ( RgnHandle ,
- PixPatHandle ) ) GetToolTrapAddress ( 0xaa12 ) ;
- SetToolTrapAddress ( ( ProcPtr ) DrawDesk , 0xaa12 )
- ;
- }
-
- theBeep = GetResource ( 'snd ' , 4000 ) ;
- if ( theBeep ) {
- DetachResource ( theBeep ) ;
- SetToolTrapAddress ( ( ProcPtr ) DoBeep , 0xA9C8 ) ;
- // SysBeep
- }
- }
- RestoreA4();
- }
-
-
-
- --
- Jon W$E4tte (h+@nada.kth.se), Hagagatan 1, 113 48 Stockholm, Sweden
-
- "Smart Friends ask no SCSI questions!"
- a Apple employee at the Bash
-
-
- ---------------------------
-
- >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Subject: Drag-and-drop to cdev window?
- Date: 10 Oct 94 16:47:53 +1300
- Organization: University of Waikato, Hamilton, New Zealand
-
- I'm writing this control panel which supports the Drag Manager. I've hit an
- odd problem: dragging Finder clipping files to my window doesn't seem to
- work.
-
- I stepped through my drag-tracking handler with MacsBug, and watched it check
- for a PICT item type, by calling GetFlavorDataSize. If there is no PICT type,
- I get badDragFlavorErr = -1852, which makes sense. If there _is_ a PICT type,
- I get cantGetFlavorErr = -1854 instead.
-
- If I drag a PICT item from another application to my control panel window,
- it works OK, so I figure a bug in my code is unlikely. :-)
-
- Anybody else encountered this? Maybe the problem is that control panels
- run in the Finder's context, and its peculiar uses of the Drag Manager don't
- allow for this.
-
- Any ideas welcomed.
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Info & Tech Services Division fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
-
- +++++++++++++++++++++++++++
-
- >From jumplong@aol.com (Jump Long)
- Date: 11 Oct 1994 01:03:03 -0400
- Organization: America Online, Inc. (1-800-827-6364)
-
- In article <1994Oct10.164754.34014@waikato.ac.nz>, ldo@waikato.ac.nz
- (Lawrence D'Oliveiro, Waikato University) writes:
-
- >I'm writing this control panel which supports the Drag Manager. I've hit
- >an odd problem: dragging Finder clipping files to my window doesn't seem
- >to work.
-
- We had the same report at work and the answer is, it won't work. I can't
- remember the reason why, but Nitin tracked it down.
-
- - Jim Luther
-
- ---------------------------
-
- >From rej@chinook.halcyon.com (Randy Jones)
- Subject: Fastest way to fill memory with a given value?
- Date: 14 Oct 1994 17:58:54 GMT
- Organization: NWNEXUS, Inc. - We Make Internet Easy
-
- I want to fill a given block of memory with copies of a long.
- I'm guessing there has to be a faster way than a loop which
- sets each word in turn. BlockMove, for example, runs faster
- than a copy loop. But there's no Mac toolbox equivalent of
- memset that I've found.
-
- Are compilers smart enough to turn my loop of word writes into
- something faster, maybe involving the MMU? If not, then what
- am I missing? Think and/or MetroWerks C, BTW.
-
- --Randy Jones
-
-
-
- +++++++++++++++++++++++++++
-
- >From relmore@halcyon.com (Richard Elmore)
- Date: Sat, 15 Oct 1994 01:54:09 -0800
- Organization: Northwest Nexus Inc.
-
- In article <37mgsu$opv@news.halcyon.com>, rej@chinook.halcyon.com (Randy
- Jones) wrote:
-
- > I want to fill a given block of memory with copies of a long.
- > I'm guessing there has to be a faster way than a loop which
- > sets each word in turn. BlockMove, for example, runs faster
- > than a copy loop. But there's no Mac toolbox equivalent of
- > memset that I've found.
-
- The most common way to speed up mem copy/fill operations is to unroll your
- loop. That is, instead of copying one long word during each iteration of
- your loop copy several. This is in fact the approach taken by
- _BlockMove. Another thing that will make a difference is to make sure all
- of your moves are longword aligned (ever notice how Hypercard snaps its
- windows an invisible grid on the screen, thats why).
-
- --
- Richard Elmore
- relmore@halcyon.com
-
- +++++++++++++++++++++++++++
-
- >From Arnold Kim <ahk12@columbia.edu>
- Date: 16 Oct 1994 20:26:04 GMT
- Organization: Nemesis Productions
-
- In